<template>
  <div class="product-detail">
    <!-- 其他商品详情内容 -->
    
    <!-- 客服聊天 -->
    <el-dialog
      title="在线客服"
      v-model="chatVisible"
      width="400px"
    >
      <customer-service :userId="userId" />
    </el-dialog>
    
    <el-button type="primary" @click="chatVisible = true">联系客服</el-button>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import CustomerService from '@/components/CustomerService.vue'

const chatVisible = ref(false)
const userId = ref('user_' + Date.now()) // 生成临时用户ID
</script> 